#!/bin/sh
########################################################################
# Begin proftpd
#
# Description : Start Pro FTP Daemon
#
# Author      : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version     : BLFS 7.2
#
########################################################################

### BEGIN INIT INFO
# Provides:            proftpd
# Required-Start:      $network
# Should-Start:        networkmanager wicd
# Required-Stop:       $network
# Should-Stop:         networkmanager wicd
# Default-Start:       3 4 5
# Default-Stop:        0 1 2 6
# Short-Description:   Starts proftpd server.
# Description:         Starts Professional FTP Daemon (proftpd).
# X-LFS-Provided-By:   BLFS
### END INIT INFO

. /lib/lsb/init-functions

#$LastChangedBy: dj $
#$Date: 2019-09-08 13:50:13 -0500 (Sun, 08 Sep 2019) $

case "$1" in
	start)
		log_info_msg "Starting FTP Server..."
		start_daemon /usr/sbin/proftpd
      evaluate_retval
		;;

	stop)
		log_info_msg "Stopping FTP Server..."
		killproc /usr/sbin/proftpd
      evaluate_retval
		;;

	reload)
		log_info_msg "Reloading FTP Server..."
		killproc /usr/sbin/proftpd -HUP
      evaluate_retval
		;;

	restart)
		$0 stop
		sleep 1
		$0 start
		;;

	status)
		statusproc /usr/sbin/proftpd
		;;

	*)
		echo "Usage: $0 {start|stop|reload|restart|status}"
		exit 1
		;;
esac

# End /etc/init.d/proftpd
